import { GLItem } from './GLItem'
import { GLFolderContainer } from './GLFolderContainer';

export abstract class GLFolderLike extends GLItem implements GLFolderContainer {
  public abstract getContent(): GLItem[];
  asFolder() {
    return Promise.resolve(this);
  }

  registerChild(item: GLItem) {
    let parent = this.getParentFolder();
    if (parent) {
      parent.registerChild(item);
    }
  }
}
